Skip to content

Conversation

@samdark
Copy link
Member

@samdark samdark commented Jan 6, 2026

Q A
Is bugfix? ✔️
New feature?
Breaks BC?
Fixed issues #289

Copilot AI review requested due to automatic review settings January 6, 2026 00:03
@samdark samdark requested review from Copilot and vjik and removed request for Copilot January 6, 2026 00:03
@samdark samdark changed the title Fix #289: Fix template file searching for double extensions such as b… Fix #289: Fix template file searching for double extensions such as blade.php Jan 6, 2026
@codecov
Copy link

codecov bot commented Jan 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.51%. Comparing base (455b8e6) to head (320461b).

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #291      +/-   ##
============================================
+ Coverage     99.50%   99.51%   +0.01%     
- Complexity      305      310       +5     
============================================
  Files            19       19              
  Lines           800      822      +22     
============================================
+ Hits            796      818      +22     
  Misses            4        4              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes issue #289 by enabling the view system to properly detect and use template renderers with double file extensions such as "blade.php". Previously, the system only recognized single-part extensions, causing renderers registered with double extensions to not be matched correctly.

  • Refactored test data provider to use named array keys for better readability
  • Updated renderer selection logic to match extensions using suffix checking instead of pathinfo
  • Enhanced template file searching to check registered renderer extensions before fallback extensions

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
tests/ViewTest.php Refactored test data provider to use named keys, removed unused parameter, and added new test case for double extension rendering
src/ViewTrait.php Modified renderer selection to use str_ends_with() for extension matching and added renderer extension checking in template file search
CHANGELOG.md Documented the bug fix for double extension support

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI commented Jan 6, 2026

@samdark I've opened a new pull request, #292, to work on those changes. Once the pull request is ready, I'll request review from you.

…292)

Co-authored-by: samdark <47294+samdark@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: StyleCI Bot <bot@styleci.io>
@samdark
Copy link
Member Author

samdark commented Jan 6, 2026

@copilot open a new pull request to apply changes based on the comments in this thread

Copy link

Copilot AI commented Jan 6, 2026

@samdark I've opened a new pull request, #293, to work on those changes. Once the pull request is ready, I'll request review from you.

@samdark samdark requested a review from vjik January 7, 2026 13:12
@samdark samdark marked this pull request as draft January 9, 2026 21:49
@samdark samdark changed the title Fix #289: Fix template file searching for double extensions such as blade.php Enh #289: Add validation of renderers configuration to ViewTrait::withRenderers() Jan 12, 2026
@samdark samdark marked this pull request as ready for review January 12, 2026 23:12
@samdark samdark requested review from Copilot and vjik January 12, 2026 23:12
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 251 to 263
public function testWithRenderersInvalidRendererTypeThrowsException(): void
{
$view = TestHelper::createView();

$this->expectException(InvalidArgumentException::class);
$this->expectExceptionMessage(
'Render stdClass is not an instance of ' . TemplateRendererInterface::class . '.'
);

$view->withRenderers([
'php' => new stdClass(),
]);
}
Copy link

Copilot AI Jan 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test only covers the case where an object that doesn't implement TemplateRendererInterface is passed (stdClass). Consider adding test cases for non-object values such as null, strings, arrays, or scalar values to ensure the validation handles these cases correctly and provides meaningful error messages.

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot open a new pull request to apply changes based on this feedback

Copy link

Copilot AI commented Jan 14, 2026

@samdark I've opened a new pull request, #296, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 4 commits January 16, 2026 02:06
Co-authored-by: samdark <47294+samdark@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link

Copilot AI commented Jan 15, 2026

@samdark I've opened a new pull request, #297, to work on those changes. Once the pull request is ready, I'll request review from you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants